type LenType=string|any[]

function getLen<T extends LenType>(arg:T){
    return arg.length
}